<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ui:page binding="#{listadoVariables.page1}" id="page1">
            <ui:html binding="#{listadoVariables.html1}" id="html1">
                <ui:head binding="#{listadoVariables.head1}" id="head1">
                    <ui:link binding="#{listadoVariables.link1}" id="link1" url="/resources/stylesheet.css"/>
                </ui:head>
                <ui:body binding="#{listadoVariables.body1}" id="body1" style="-rave-layout: grid">
                    <ui:form binding="#{listadoVariables.form1}" id="form1">
                        <div style="position: absolute; left: 0px; top: 0px">
                            <jsp:directive.include file="encab1.jspf"/>
                        </div>
                        <h:panelGrid binding="#{listadoVariables.gridPanelPrincipal}" columns="1" id="gridPanelPrincipal"
                            style="height: 360px; left: 48px; top: 168px; position: absolute; text-align: center" width="552">
                            <ui:staticText binding="#{listadoVariables.titulo1}" id="titulo1"
                                style="color: rgb(108, 154, 154); font-family: 'Times New Roman',Times,serif; font-size: 18px; text-align: center" text="Consulta de Variables"/>
                            <h:panelGrid binding="#{listadoVariables.gridPanel3}" id="gridPanel3" style="height: 72px; width: 100%">
                                <ui:alert binding="#{listadoVariables.alert1}" id="alert1"/>
                            </h:panelGrid>
                            <h:panelGrid binding="#{listadoVariables.gridPanel1}" columns="4" id="gridPanel1" style="height: 45px; width: 100%">
                                <ui:label binding="#{listadoVariables.label7}" id="label7" text="Nombre:"/>
                                <ui:textField binding="#{listadoVariables.textFieldNombre}" id="textFieldNombre"/>
                                <ui:label binding="#{listadoVariables.label8}" id="label8" text="Código:"/>
                                <ui:textField binding="#{listadoVariables.textFieldCodigo}" id="textFieldCodigo"/>
                            </h:panelGrid>
                            <h:panelGrid binding="#{listadoVariables.gridPanel2}" columns="6" id="gridPanel2" style="height: 87px; text-align: center; width: 100%">
                                <ui:label binding="#{listadoVariables.label1}" id="label1" text="Area"/>
                                <ui:dropDown binding="#{listadoVariables.dropDownArea}" id="dropDownArea" items="#{listadoVariables.sct0020DataProvider.options['SCT0020.CDGOAREASLCTUD,SCT0020.DSCRPCIONAREASLCTUD']}"/>
                                <ui:label binding="#{listadoVariables.label2}" id="label2" text="Exigible:"/>
                                <ui:dropDown binding="#{listadoVariables.dropDownExigible}" id="dropDownExigible"
                                    items="#{listadoVariables.dropDownExigibleDefaultOptions.options}" style="height: 21px"/>
                                <ui:label binding="#{listadoVariables.label3}" id="label3" text="Restricciones:"/>
                                <ui:dropDown binding="#{listadoVariables.dropDownRestricciones}" id="dropDownRestricciones"
                                    items="#{listadoVariables.dropDownRestriccionesDefaultOptions.options}" style="height: 21px"/>
                                <ui:label binding="#{listadoVariables.label4}" id="label4" text="Tipo"/>
                                <ui:dropDown binding="#{listadoVariables.dropDownTipo}" id="dropDownTipo"
                                    items="#{listadoVariables.dropDownTipoDefaultOptions.options}" style="height: 20px"/>
                                <ui:label binding="#{listadoVariables.label5}" id="label5" text="Tipo de Dato:"/>
                                <ui:dropDown binding="#{listadoVariables.dropDownTipoDato}" id="dropDownTipoDato"
                                    items="#{listadoVariables.dropDownTipoDatoDefaultOptions.options}" style="height: 21px"/>
                                <ui:label binding="#{listadoVariables.label6}" id="label6" text="Tipo de variable:"/>
                                <ui:dropDown binding="#{listadoVariables.dropDownTipoVariable}" id="dropDownTipoVariable"
                                    items="#{listadoVariables.dropDownTipoVariableDefaultOptions.options}" style="height: 21px"/>
                            </h:panelGrid>
                            <ui:table binding="#{listadoVariables.table1}" clearSortButton="true" id="table1" paginateButton="true" paginationControls="true"
                                sortPanelToggleButton="true" title="Variables" width="560">
                                <script><![CDATA[
/* ----- Functions for Table Preferences Panel ----- */
/*
 * Toggle the table preferences panel open or closed
 */
function togglePreferencesPanel() {
  var table = document.getElementById("form1:table1");
  table.toggleTblePreferencesPanel();
}
/* ----- Functions for Filter Panel ----- */
/*
 * Return true if the filter menu has actually changed,
 * so the corresponding event should be allowed to continue.
 */
function filterMenuChanged() {
  var table = document.getElementById("form1:table1");
  return table.filterMenuChanged();
}
/*
 * Toggle the custom filter panel (if any) open or closed.
 */
function toggleFilterPanel() {
  var table = document.getElementById("form1:table1");
  return table.toggleTableFilterPanel();
}
/* ----- Functions for Table Actions ----- */
/*
 * Initialize all rows of the table when the state
 * of selected rows changes.
 */
function initAllRows() {
  var table = document.getElementById("form1:table1");
  table.initAllRows();
}
/*
 * Set the selected state for the given row groups
 * displayed in the table.  This functionality requires
 * the 'selectId' of the tableColumn to be set.
 *
 * @param rowGroupId HTML element id of the tableRowGroup component
 * @param selected Flag indicating whether components should be selected
 */
function selectGroupRows(rowGroupId, selected) {
  var table = document.getElementById("form1:table1");
  table.selectGroupRows(rowGroupId, selected);
}
/*
 * Disable all table actions if no rows have been selected.
 */
function disableActions() {
  // Determine whether any rows are currently selected
  var table = document.getElementById("form1:table1");
  var disabled = (table.getAllSelectedRowsCount() > 0) ? false : true;
  // Set disabled state for top actions
  document.getElementById("form1:table1:tableActionsTop:deleteTop").setDisabled(disabled);
  // Set disabled state for bottom actions
  document.getElementById("form1:table1:tableActionsBottom:deleteBottom").setDisabled(disabled);
}]]></script>
                                <ui:tableRowGroup binding="#{listadoVariables.tableRowGroup1}" id="tableRowGroup1" rows="10"
                                    sourceData="#{listadoVariables.sct0001DataProvider}" sourceVar="currentRow">
                                    <ui:tableColumn binding="#{listadoVariables.tableColumn1}" headerText="Nombre" id="tableColumn1" sort="NMBREVRBLE">
                                        <ui:staticText binding="#{listadoVariables.staticText1}" id="staticText1" text="#{currentRow.value['NMBREVRBLE']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{listadoVariables.tableColumn2}" headerText="Codigo" id="tableColumn2" sort="CDGOVRBLE">
                                        <ui:staticText binding="#{listadoVariables.staticText2}" id="staticText2" text="#{currentRow.value['CDGOVRBLE']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{listadoVariables.tableColumn7}" headerText="Area" id="tableColumn7" sort="CDGOAREASLCTUD">
                                        <ui:staticText binding="#{listadoVariables.staticText7}" id="staticText7" text="#{currentRow.value['CDGOAREASLCTUD']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{listadoVariables.tableColumn9}" headerText="Restriccion" id="tableColumn9">
                                        <ui:staticText binding="#{listadoVariables.staticText9}" id="staticText9" text="#{listadoVariables.restriccionSiNo}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{listadoVariables.tableColumn10}" headerText="Tipo dato" id="tableColumn10">
                                        <ui:staticText binding="#{listadoVariables.staticText10}" id="staticText10" text="#{listadoVariables.clasesDeTiposDeDatos}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{listadoVariables.tableColumn11}" headerText="Tipo Variables" id="tableColumn11">
                                        <ui:staticText binding="#{listadoVariables.staticText11}" id="staticText11" text="#{listadoVariables.calculadaCapturada}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn align="center" binding="#{listadoVariables.tableColumn12}" id="tableColumn12">
                                        <ui:button action="#{listadoVariables.button3_action}" binding="#{listadoVariables.button3}" id="button3" mini="true"
                                            onClick="if(confirm(&quot;Esta seguro de borrar esta variable&quot;)){ return true;}else{var prop=document.getElementById('form1:alert1'); prop.setVisible(false); return false;}"
                                            primary="true" text="Eliminar"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn align="center" binding="#{listadoVariables.tableColumn13}" id="tableColumn13">
                                        <ui:button action="#{listadoVariables.button4_action}" binding="#{listadoVariables.button4}" id="button4" mini="true"
                                            primary="true" text="Editar"/>
                                    </ui:tableColumn>
                                </ui:tableRowGroup>
                                <!-- Actions (Top) -->
                                <f:facet name="actionsTop">
                                    <ui:button action="#{listadoVariables.button2_action}" binding="#{listadoVariables.button2}" id="button2" mini="true"
                                        primary="true" style="width: 71px" text="Buscar"/>
                                </f:facet>
                            </ui:table>
                        </h:panelGrid>
                        <ui:button action="#{listadoVariables.button1_action}" binding="#{listadoVariables.button1}" id="button1" immediate="true" mini="true"
                            primary="true" style="left: 47px; top: 120px; position: absolute; width: 71px" text="Cerrar"/>
                        <ui:hiddenField binding="#{listadoVariables.hiddenFieldBorrado}" id="hiddenFieldBorrado"/>
                        <ui:messageGroup binding="#{listadoVariables.messageGroup1}" id="messageGroup1" style="position: absolute; left: 696px; top: 192px"/>
                    </ui:form>
                </ui:body>
            </ui:html>
        </ui:page>
    </f:view>
</jsp:root>
